{extend name="public/base" /}

{block name="content"}
<div class="container-fluid">
    <div class="breadcrumb-wrapper row">
        <div class="col-12 col-lg-3 col-md-6">
            <h4 class="page-title">编辑菜单</h4>
        </div>
        <div class="col-12 col-lg-9 col-md-6">
            <ol class="breadcrumb float-right">
                <li><a href="{:url('Manage/home')}">控制台</a></li>
                <li class="active"> / 编辑菜单</li>
            </ol>
        </div>
    </div>
</div>

<div class="container-fluid">
    <div class="row">
        <div class="col-12">
            <div class="card">
                <div class="card-body">
                    <form method="post" action="{:url('Menu/editMenuDo')}">
                        <input type="hidden" name="id" value="{$info.id}">
                        <div class="form-group">
                            <label>名称</label>
                            <input class="form-control" type="text" name="name" value="{$info.name}">
                        </div>
                        <div class="form-group">
                            <label>URL</label>
                            <input class="form-control" type="text" name="link" value="{$info.link}">
                        </div>
                        <div class="form-group">
                            <label>父级菜单</label>
                            <select class="form-control" name="pid">
                                <option value="0">顶级</option>
                                {volist name="topMenu" id="item"}
                                <option value="{$item.id}"
                                        {eq name="item.id" value="$info.pid"}
                                        selected
                                        {/eq}
                                >{$item.name}</option>
                                {/volist}
                            </select>
                        </div>

                        <div class="form-group">
                            <div class="custom-control custom-radio radio custom-control-inline">
                                <input type="radio" class="custom-control-input" name="isshow" id="show1" value="1"
                                       {eq name="info.isshow" value="1"}
                                       checked
                                       {/eq}
                                >
                                <label class="custom-control-label" for="show1">显示</label>
                            </div>
                            <div class="custom-control custom-radio radio custom-control-inline">
                                <input type="radio" class="custom-control-input" name="isshow" id="hidden1" value="0"
                                       {eq name="info.isshow" value="0"}
                                       checked
                                       {/eq}
                                >
                                <label class="custom-control-label" for="hidden1">隐藏</label>
                            </div>
                        </div>

                        <br>
                        <button type="submit" class="btn btn-common">提交保存</button>
                        <a href="{:url('Menu/MenuList')}" class="btn btn-light">返回列表</a>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

{/block}